package org.myboot.login_23010304.cron;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class JdbcU {

    public static Connection getCon() throws ClassNotFoundException, SQLException {
        // 加载驱动
        Class.forName("com.mysql.cj.jdbc.Driver");
        Connection connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/baway?allowPublicKeyRetrieval" +
                "=true&useSSL=false&useLegacyDatetimeCode=false&authenticationPlugin=" +
                "mysql_native_password", "root", "123456Aa");
        System.out.println("asdfkaksdj");
        return connection;
    }

}
